package org.bing.engine.console.service;

import java.util.List;

import org.bing.engine.core.domain.Application;

public class ApplicationManager extends AbstractHibernateManager {

    public void save(Application app) {
        template.saveOrUpdate(app);
    }

    @SuppressWarnings("unchecked")
    public List<Application> findAll() {
        List<Application> list = template.find("select t from Application t");
        return list;
    }

    public void delete(Application app) {
        super.excuteHql("delete from ApplicationOfDomain t where t.application=?", app);
    }
}
